#include "EXResDefine.h"

#pragma once
class AFX_EXT_CLASS CEXResMng
{
public:
  CEXResMng(void);
  ~CEXResMng(void);

  CEXBaseResSet* GetResSet(UINT nId);
  INT_PTR GetResSetIndex(UINT nResSetID);

  int InitResourceMng();
  void EmptyResource();

  void EmptyResourceColor();
  void InitColor();
  INT_PTR FindColorIndex(UINT nID);
  int RegistColor(UINT nId, COLORREF crColor);
  COLORREF GetColor(UINT nId);

  void EmptyResourceColorSet();
  void InitColorSet();
  INT_PTR FindColorSetIndex(UINT nID);
  int RegistColorSet(UINT nId, COLORREF crNormal = 0, COLORREF crSelect = 0, 
                    COLORREF crFocus = 0, COLORREF crDisable = 0);
  COLORREF* GetColorSet(UINT nId);

  void EmptyResourceImg();
  void InitImg();
  INT_PTR FindImgIndex(UINT nID);
  int RegistImg(UINT nId, UINT nImgid, int ndivide_Count);
  UINT GetImg(UINT nId);
  int GetImgCount(UINT nId);

  void EmptyResourceFont();
  void InitFont();
  INT_PTR FindFontIndex(UINT nID);
  CFont* GetFont(UINT nId);
  COLORREF GetFontColor(UINT nId);
  int RegistFont(UINT nId, COLORREF textColor, LOGFONT log_font);


  void EmptyResourceResSet();
  void InitResSet();
  void RegResSet(UINT nId, CEXBaseResSet *pResSet);



  void ButtonResSet();
  void EditResSet();
  void DateTimeResSet();
  void DropDownComboResSet();
  void DropListComboResSet();
  void HeaderCtrlResSet();
  void IPAddressResSet();
  void ListCtrlResSet();
  void ListCtrlWndResSet();
  void ProgressCtrlResSet();
  void ScrollBarResSet();
  void SliderCtrlResSet();
  void SpinButtonResSet();
  void StaticResSet();
  void Dialog();
  void MsgBox();
 
private:
  CArray<RESOURCE_IMAGE *, RESOURCE_IMAGE *> m_arrResImg;
  CArray<RESOURCE_SET *, RESOURCE_SET *> m_arrResSet;
  CArray<RESOURCE_COLOR *, RESOURCE_COLOR *> m_arrResourceColor;
  CArray<RESOURCE_FONT *, RESOURCE_FONT *> m_arrResourceFont;
  CArray<RESOURCE_COLORSET *, RESOURCE_COLORSET *> m_arrResourceColorSet;

};

